<!DOCTYPE html>
<html>
    <head>
        <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>

    </head>
    <body>
        <div id="app">
            <com-a></com-a>
        </div>
        <template id="temp">
            <table width="300"  `border="1">
                <tr><td>子组件</td></tr>
            </table>
        </template>
        <script>
            const com2 = {
                template:"#temp"
            }
            const com1 = {
                components:{
                    "com-b":com2
                },
                template: `<h1>组件</h1>
                <com-b></com-b> `
            }
            const vm=Vue.createApp({
                components:{
                    "com-a":com1
                }
            })
            vm.mount("#app")
        </script>
